<?php

namespace app\common\validate;

use think\Validate;

class StDept extends Validate
{
    //protected $batchValidate = true;
    //定义验证规则
    protected $rule = [
        'code'        => 'require',
        //'parent_code' => 'require',
        'dept_name'   => 'require|max:25',
        'comid'       => 'require|number',
    ];

    //定义验证提示
    protected $message = [
        'code.require'      => '部门编号不能为空值哦',
        'parent_code.require'  => '父级编号不能为空值哦',
        'dept_name.require' => '部门名称不能为空值哦',
        'comid.number' => '部门单位必须是数字',
    ];

}